package com.cloud.spring.demo.service;

import com.cloud.spring.demo.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Service
public class UserService {
    @Autowired
    User user;

    public int insert(User user) {
        return 1;
    }

    public User select() {
        user.setId(1);
        user.setName("tom");
        user.setBirth(LocalDate.parse("1993-09-16"));
        user.setEmail("143@qq.com");
        user.setLocalDateTime(LocalDateTime.now());
        user.setPhone("16534568905");
        return user;
    }
}
